import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2024-11-16
 * 22:02
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        float h=scanner.nextFloat();
        int n =scanner.nextInt();

        //write your code here......
        float sum=h;
        n--;
        h=h/2;
        float ret=0;
        while(n!=0){
            sum+=2*h;
            h=h/2;
            n--;
        }

        System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum));


    }
}
